# -*- encoding: utf-8 -*-
"""

PyCharm reversed函数的使用.py
2024年10月20日21时36分
by wenyang

"""

def main():
    list_items = ["hello", "world", "java", "python"]
    print(list(reversed(list_items)))
    with open("./test.txt", "a") as f:
        for item in list_items:
            f.write(item + "\n")
    with open("./test.txt") as f:
        for line in f.readlines():
            print(line)


if __name__ == "__main__":
    main()
